<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:c="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui">
<h:head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
	<title>
	    <ui:insert name="titulo">Sistema de Notas Fiscais - Uberdist</ui:insert>
	</title>
</h:head>
<h:body>

	<div id="cabecalho" style="height: 42px;">
		<h:outputLabel value="Sistema de Notas Fiscais - Uberdist" style="font-weight: bold;"/>
				
		<h:panelGroup rendered="#{not empty loginBean.usuario.login}">
			
			<div id="usuarioLogado" style="float: right;">
				Logado como: #{loginBean.usuario.login}
				<h:form>
					<h:commandLink action="#{loginBean.logout}" value="Logout" />
				</h:form>
			</div>
		</h:panelGroup>
		
		<hr />
	</div>
			
	<div id="conteudo">
			<h:panelGroup rendered="#{not empty loginBean.usuario.login}">
			<h:form>
				<p:menubar>
					<p:menuitem value="Produtos" url="produto.jsf" />
					<p:menuitem value="Gráficos" url="grafico.jsf"/>
					<p:submenu label="Notas Fiscais">
						<p:menuitem value="Cadastro" url="notafiscal.jsf"
							icon="ui-icon ui-icon-document" />
						<p:menuitem value="Listagem" url="listanotas.jsf" icon="ui-icon-search"/>
					</p:submenu>
					<p:menuitem value="Sair" action="#{loginBean.logout}"
						icon="ui-icon-close" />
				</p:menubar>
			</h:form>
		</h:panelGroup>
		
		<ui:insert name="corpo"/>
		
	</div>
	
	<br />
	
	<div id="rodape" style="text-align: center;">
		<hr />
		&copy; 2013. Todos os direitos reservados.
	</div>

</h:body>
</html>